//package com.example.musicplayer;
//
//import org.json.JSONArray;
//import org.json.JSONException;
//import org.json.JSONObject;
//
//import java.util.ArrayList;
//import java.util.List;
//
//public class Bean{
//    private String musicFileUrl;
//
//    private String musicTitle;
//
//    private String musicUrl;
//
//    private String musicId;
//
//    private String musicDuration;
//
//    private String musicFileName;
//
//    private String musicAuthor;
//
//
//    public void setMusicFileUrl(String musicFileUrl){
//        this.musicFileUrl = musicFileUrl;
//    }
//    public String getMusicFileUrl(){
//        return this.musicFileUrl;
//    }
//    public void setMusicTitle(String musicTitle){
//        this.musicTitle = musicTitle;
//    }
//    public String getMusicTitle(){
//        return this.musicTitle;
//    }
//    public void setMusicUrl(String musicUrl){
//        this.musicUrl = musicUrl;
//    }
//    public String getMusicUrl(){
//        return this.musicUrl;
//    }
//    public void setMusicId(String musicId){
//        this.musicId = musicId;
//    }
//    public String getMusicId(){
//        return this.musicId;
//    }
//    public void setMusicDuration(String musicDuration){
//        this.musicDuration = musicDuration;
//    }
//    public String getMusicDuration(){
//        return this.musicDuration;
//    }
//    public void setMusicFileName(String musicFileName){
//        this.musicFileName = musicFileName;
//    }
//    public String getMusicFileName(){
//        return this.musicFileName;
//    }
//    public void setMusicAuthor(String musicAuthor){
//        this.musicAuthor = musicAuthor;
//    }
//    public String getMusicAuthor(){
//        return this.musicAuthor;
//    }
//    public static Bean fill(JSONObject jsonobj) throws JSONException {
//        Bean entity = new Bean();
//        if (jsonobj.containsKey("musicFileUrl")) {
//            entity.setMusicFileUrl(jsonobj.getString("musicFileUrl"));
//        }
//        if (jsonobj.containsKey("musicTitle")) {
//            entity.setMusicTitle(jsonobj.getString("musicTitle"));
//        }
//        if (jsonobj.containsKey("musicUrl")) {
//            entity.setMusicUrl(jsonobj.getString("musicUrl"));
//        }
//        if (jsonobj.containsKey("musicId")) {
//            entity.setMusicId(jsonobj.getString("musicId"));
//        }
//        if (jsonobj.containsKey("musicDuration")) {
//            entity.setMusicDuration(jsonobj.getString("musicDuration"));
//        }
//        if (jsonobj.containsKey("musicFileName")) {
//            entity.setMusicFileName(jsonobj.getString("musicFileName"));
//        }
//        if (jsonobj.containsKey("musicAuthor")) {
//            entity.setMusicAuthor(jsonobj.getString("musicAuthor"));
//        }
//        return entity;
//    }
//    public static List<Bean> fillList(JSONArray jsonarray) {
//        if (jsonarray == null || jsonarray.size() == 0)
//            return null;
//        List<Bean> olist = new ArrayList<Bean>();
//        for (int i = 0; i < jsonarray.size(); i++) {
//            try {
//                olist.add(fill(jsonarray.getJSONObject(i)));
//            } catch (JSONException e) {
//                e.printStackTrace();
//            }
//        }
//        return olist;
//    }
//}

package com.example.flutter_plugin_test;
import java.util.Objects;

///{
// musicFileUrl=/storage/emulated/0/静心音乐/yinyue/周杰伦 - 蒲公英的约定.mp3,
// musicTitle=蒲公英的约定,
// music_url=/storage/emulated/0/静心音乐/yinyue/周杰伦 - 蒲公英的约定.mp3,
// musicId=98044,
// music_duration=245368,
// music_file_name=蒲公英的约定,
// music_author=周杰伦}
public class Bean {
    String musicFileUrl;
    String musicTitle;
    String musicUrl;
    String musicId;
    String musicDuration;
    String musicFileName;
    String musicAuthor;

    public Bean(String musicFileUrl, String musicTitle, String musicUrl, String musicId, String musicDuration, String musicFileName, String musicAuthor) {
        this.musicFileUrl = musicFileUrl;
        this.musicTitle = musicTitle;
        this.musicUrl = musicUrl;
        this.musicId = musicId;
        this.musicDuration = musicDuration;
        this.musicFileName = musicFileName;
        this.musicAuthor = musicAuthor;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Bean bean = (Bean) o;
        return Objects.equals(musicFileUrl, bean.musicFileUrl)
                && Objects.equals(musicTitle, bean.musicTitle)
                && Objects.equals(musicUrl, bean.musicUrl)
                && Objects.equals(musicId, bean.musicId)
                && Objects.equals(musicDuration, bean.musicDuration)
                && Objects.equals(musicFileName, bean.musicFileName)
                && Objects.equals(musicAuthor, bean.musicAuthor);
    }

    @Override
    public int hashCode() {
        return Objects.hash(musicFileUrl, musicTitle, musicUrl, musicId, musicDuration, musicFileName, musicAuthor);
    }
}

